<template>
	<view>
		<view class="titleBox">
			<view class="titleLeft">
				<img src="../../static/title/back.png" class="titleBack" @click="goBack">
			</view>
			<view class="titleText">
				<text>账单</text>
			</view>
			<view class="titleRight">
				
			</view>
		</view>
		<!-- 提现记录 -->
		<view class="box" v-for="item,index in list" :key="index">
			<view class="record-box" >
				<view class="left">
					<view class="left-1">
						<img src="../../static/my/bill.png" alt="">
					</view>
					<view class="left-2">
						<view class="">
							余额提现-到{{item.CashOutType}} 
						</view>
						<view class="text">{{item.BankAccount || ''}}</view>
						<view class="left-2-time">
							{{item.CreateTime.replace('T',' ')}}
						</view>
					</view>
				</view>
				<view class="right">
					{{item.Amount}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	var app= getApp();
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad() {
			this.getPayRecord()
		},
		methods: {
			// 返回
			goBack() {
				uni.navigateBack(0)
			},
			// 获取支付记录
			getPayRecord() {
				uni.request({
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					url: 'https://ypsf.huashengzhuan.cn/Application/NewShopApi.ashx',
					method: 'POST',
					data: {
						OpenID: app.globalData.openID,
						action:'getCashOutRecord'
					},
					dataType: 'json',
					success: res => {
						debugger;
						console.log(res.data);
						this.list = res.data
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
		// padding-top: 30rpx;
	}
.box {
	border-bottom: 1rpx solid #ccc;
	padding: 20rpx;
	box-sizing: border-box;
}
.record-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 120rpx;
	// padding: 0 30rpx;
	// border-bottom: 1rpx solid #ccc;
	.left {
		display: flex;
		.left-1 {
			margin-right: 10rpx;
			img {
				width: 120rpx;
				height: 120rpx;
			}
		}
		.left-2 {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			.text {
				width: 100%;
				font-size: 24rpx;
				margin: 10rpx 0;
			}
		}
		.left-2-time {
			font-size: 24rpx;
			color: #ccc;
		}
	}
}
.right{
	margin-right: 20rpx;
}
</style>
